<template>
  <!--退款订单组件-->
  <div class="app-container">
    <el-table :data="refundRecordList" style="width: 100%">
      <el-table-column type="index" label="序号" align="center"></el-table-column>
      <!-- 款单ID -->
      <el-table-column prop="id" label="款单ID" align="center"></el-table-column>
      <!-- 商户订单编号 -->
      <el-table-column prop="orderNo" label="商户订单编号" align="center" show-overflow-tooltip></el-table-column>
      <!-- 商户退款单编号 -->
      <el-table-column prop="refundNo" label="商户退款单编号" align="center" show-overflow-tooltip></el-table-column>
      <!-- 支付系统退款单号 -->
      <el-table-column prop="refundId" label="支付系统退款单号" align="center" show-overflow-tooltip></el-table-column>
      <!-- 原订单金额(元) -->
      <el-table-column prop="totalFee" label="原订单金额(元)" align="center"></el-table-column>
      <!-- 退款金额(元) -->
      <el-table-column label="退款金额(元)" align="center">
        <template slot-scope="scope">
          <el-tag>{{ scope.row.refund }}元</el-tag>
        </template>
      </el-table-column>
      <!-- 退款原因 -->
      <el-table-column label="退款原因" align="center">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_reason_type" :value="scope.row.reason" />
        </template>
      </el-table-column>
      <!-- 退款状态 -->
      <el-table-column label="退款状态" align="center">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_refund_status" :value="scope.row.refundStatus" />
        </template>
      </el-table-column>
      <!-- 申请退款返回参数 -->
      <el-table-column prop="contentReturn" label="申请退款返回参数" show-overflow-tooltip align="center"></el-table-column>
      <!-- 退款结果通知参数 -->
      <el-table-column prop="contentNotify" label="退款结果通知参数" align="center"></el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
import {RefundList} from "@/api/pay/paylist";

export default {
  dicts: ['sys_reason_type','sys_refund_status'],
  data(){
    return {
      refundRecordList: [],
      total:0,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
    }
  },
  methods:{
    getList(){
      RefundList(this.queryParams).then(res => {
        this.refundRecordList = res.rows;
        this.total = res.total;
      })
    }
  },
  created() {
    this.getList();
  }
}
</script>

<style scoped>

</style>
